package com.techsoul.module.pms.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.techsoul.module.pms.pojo.entity.TbWmsMaterialInLocation;
import com.techsoul.module.pms.pojo.param.TbWmsMaterialInLocationSearchParam;
import com.techsoul.module.pms.pojo.vo.TbWmsMaterialInLocationVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 货区货物清单Mapper接口
 * 
 * @author liuen
 * @date 2022-01-25
 */
public interface TbWmsMaterialInLocationMapper extends BaseMapper<TbWmsMaterialInLocation> {

    /**
     * 详情
     * @param id
     * @return
     */
    TbWmsMaterialInLocationVo findById(String id);
    List<TbWmsMaterialInLocationVo> findMaterialByFifo(@Param("materialNo") String materialNo);
    double countBySkuCode(@Param("skuCode") String skuCode);
    List<TbWmsMaterialInLocation>  findByrfid(@Param("rfidCode") String rfidCode);
    List<TbWmsMaterialInLocation>  findByReciptLineId(@Param("receivedLineId") String receivedLineId);

    List<TbWmsMaterialInLocationVo>  findVoByReciptLineId(@Param("receivedLineId") String receivedLineId);
    List<TbWmsMaterialInLocation>  findByLocationNo(@Param("locationNo") String locationNo);
    List<TbWmsMaterialInLocation>  findByMaterialNo(@Param("serialNo") String serialNo);
    List<TbWmsMaterialInLocationVo>  findVoByMaterialNo(@Param("serialNo") String serialNo);
    /**
     * 列表
     * @param params
     * @return
     */
    List<TbWmsMaterialInLocationVo> findAll(@Param("params") TbWmsMaterialInLocationSearchParam params);

    List<String> findAllIds(@Param("params") TbWmsMaterialInLocationSearchParam params);

    /**
     * 分页
     * @param page
     * @param params
     * @return
     */
    IPage<TbWmsMaterialInLocationVo> findAll(Page page, @Param("params") TbWmsMaterialInLocationSearchParam params);

}
